//
//  WDExtension.swift
//  UIKitExtentions
//
//  Created by Alean on 2022/12/21.
//

import Foundation

/**
 A type that has WDExtension extensions.
 */
public protocol WDExtensionCompatible {
    associatedtype CompatibleType
    var wd: CompatibleType { get }
}

public final class WDExtension<Base> {
    public let base: Base
    public init(_ base: Base) {
        self.base = base
    }
}

public extension WDExtensionCompatible {
    public var wd: WDExtension<Self> {
        return WDExtension(self)
    }
}

extension NSObject: WDExtensionCompatible {}
